<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function a () {
            a=3
            console.log(a)
        }
        a()
        // 以上执行步骤
        // 函数声明式提升，他会变成函数表达式的形式，然后执行a
        // 重新给a赋值，再打印a为3
        var a = function() {
            a = 3
            console.log(a)
        }
        a()
    </script>
</body>
</html>